﻿<UserControl x:Class="BeeCoders.Tools.ControlCanvas.Controls.InputControlPropertyView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
			  xmlns:vm="clr-namespace:BeeCoders.Tools.ControlCanvas"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Infrastructure="clr-namespace:BeeCoders.Tools.ControlCanvas.Infrastructure" mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="500">
    <UserControl.Resources>
        <Infrastructure:EnumDisplayer Type="{x:Type Infrastructure:ControlTypeEnum}" x:Key="ControlTypeEnum"></Infrastructure:EnumDisplayer>

        <Infrastructure:BooleanToVisualVisibility x:Key="BooleanToVisualVisibility"></Infrastructure:BooleanToVisualVisibility>
    </UserControl.Resources>

    <Grid>

        <TabControl Name="MainTabControl">
            <TabItem Header="Properties" Name="tabProperties">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="140" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="40" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="10" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="150*" />
                    </Grid.RowDefinitions>

                    <Label  Name="lblType" Content="Type:" 
                            Grid.Row="4" Grid.Column="0"/>

                    <ComboBox Name="myControlType" 
                              ItemsSource="{Binding Source={StaticResource ControlTypeEnum},Path=DisplayNames}" SelectedValue="{Binding Path=ControlType,Converter={StaticResource ControlTypeEnum}}" 
                              Grid.Row="4" Grid.Column="1" />

                    <Label Name="lblValue" Content="Default Value:"
                           Grid.Row="2" Grid.Column="0"/>

                    <TextBox Name="Value" 
                             Text="{Binding ParameterValue}"
                             Grid.Row="2" Grid.Column="1" />

                    <Label Name="lblPrompt" Content="Prompt:" 
                           Grid.Row="3" Grid.Column="0"/>
                    <TextBox Name="Prompt" 
                             Text="{Binding Prompt}" 
                             Grid.Row="3" Grid.Column="1"/>

                    <Label Name="lblName" Content="Name:" 
                           Grid.Row="1" Grid.Column="0"/>

                    <TextBox Name="Name" 
                             Text="{Binding Name}" 
                             Grid.Row="1" Grid.Column="1" />

					<Label Name="lblTabOrder" Content="Tab Order:" 
                           Grid.Row="5" Grid.Column="0"/>
					<TextBox Name="TabOrder" 
                             Text="{Binding TabOrder}" 
                             Grid.Row="5" Grid.Column="1"/>

					<CheckBox Name="MultiValue" 
                              IsChecked="{Binding MultiValue}" 
                              Content="Is Multi Value"
                              Margin="5"
							  Grid.Row="6" Grid.Column="1" />

                    <CheckBox Name="AllowBlank" 
                              IsChecked="{Binding AllowBlank}" 
                              Content="Allow blank"
                              Margin="5"
                              Grid.Row="7" Grid.Column="1" />


                    <CheckBox Name="Nullable" 
                              IsChecked="{Binding Nullable}" 
                              Content="Nullable"
                              Margin="5"
                              Grid.Row="8" Grid.Column="1" />

                    <CheckBox Name="QueryBased" 
                              IsChecked="{Binding QueryBased}" 
                              Content="Result based on a query"
                              Margin="5"
                              Grid.Row="9" Grid.Column="1" />
                </Grid>
            </TabItem>
            <TabItem  Header="Valid Values" Name="tabValidValues" Visibility="{Binding MultiValueSpecified,Converter={StaticResource BooleanToVisualVisibility}}">
                
            </TabItem>
        </TabControl>

  

    </Grid>
</UserControl>
